<template>
  <view class="tab">
    <view class="list">
      <navigator
        class="content"
        v-for="item in arr"
        :key="item"
        :url="item.url"
      >
        <view class="icon">
          <image :src="item.image"></image>
          <!-- <image src="@/static/icon.png"></image> -->
        </view>
        <view class="text">{{ item.text }}</view>
      </navigator>
    </view>
  </view>
</template>

<script>
export default {
  name: "tab",
  data() {
    return {
      arr: [
        {
          url: "",
          image: "/static/icon.png",
          text: "廉政学习",
        },
        {
          url: "",
          image: "/static/icon.png",
          text: "廉政学习",
        },
        {
          url: "",
          image: "/static/icon.png",
          text: "廉政学习",
        },
        {
          url: "",
          image: "/static/icon.png",
          text: "廉政学习",
        },
        {
          url: "",
          image: "/static/icon.png",
          text: "廉政学习",
        },
        {
          url: "",
          image: "/static/icon.png",
          text: "廉政学习",
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.tab {
  width: 100%;
  overflow: hidden;
  .list {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    .content {
      width: 120rpx;
      height: 120rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-around;
      flex: 0 0 25%;
      margin: 30rpx 0;
      .icon {
        width: 48rpx;
        height: 48rpx;
        image {
          width: 100%;
          height: 100%;
        }
      }
      .text {
        font-size: 28rpx;
      }
    }
  }
}
</style>